--- id: TASK-046 title: New-file naming dialog + editor filename header status: "\U0001F7E2 In progress" assignee: [] created_date: '2026-07-31 00:34' updated_date: '2026-07-31 02:36' labels: - feature dependencies: [] priority: medium ordinal: 45000 --- ## Description Ask for the filename up front in a centered dialog whenever a new file is created, and show the filename in editor mode as an uneditable header bar styled like preview's title bar. Collapses save-as/new-file into one dialog component (new internal/dialog package) and reuses it for F2 rename. Design: docs/superpowers/specs/2026-07-30-new-file-dialog-design.md ## Acceptance Criteria - [ ] #1 Ctrl+N/Ctrl+B, picker Ctrl+N (prefilled with query), and 'glint -n' with no name all open a centered naming dialog - [ ] #2 Enter creates the file immediately and opens it; existing name opens that file; slashes nest subdirs; empty name reports 'Type a name first' - [ ] #3 Esc cancels back to the previous mode with nothing written - [ ] #4 Editor mode shows the basename (minus .md) as a full-width header bar in the top pad, costing no text rows - [ ] #5 Pathless buffer shows muted 'Untitled'; dirty buffer appends a bullet - [ ] #6 F2 renames the current file on disk, rebinds the path, and reopens Harper under the new URI - [ ] #7 ModeSaveAs/saveInput/saveBar removed; Ctrl+S on a pathless buffer opens the same dialog